package it.tukano.swingdeco.table;

import java.awt.Component;
import javax.swing.AbstractCellEditor;
import javax.swing.JTable;
import javax.swing.table.TableCellEditor;

public class ComponentValueEditor extends AbstractCellEditor implements TableCellEditor {

    /* Serial version of this class */
    private static final long serialVersionUID = 0;

    private Object editorValue;

    /**
     * Instance initializer
     */
    public ComponentValueEditor() {
    }

    public Object getCellEditorValue() {
        return editorValue;
    }

    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
        editorValue = value;
        return (Component) value;
    }
}
